<%--
  Created by IntelliJ IDEA.
  User: v.tsapaev
  Date: 25.05.12
  Time: 19:01
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>

<div id="header">
    <div id="find-order">
        <security:authorize access="isAuthenticated()">
            <div style="float: left"><input id="find-order-input" type="text" class="digit"></div>
            <div id="find-order-container"></div>
        </security:authorize>

        <div id="main-page">
            <a href="${pageContext.request.contextPath}/app/main.htm">на главную</a>
            <security:authorize access="hasRole('ROLE_ADMIN')">
                <a href="${pageContext.request.contextPath}/app/order-list.htm">список заказов</a>
            </security:authorize>
        </div>
    </div>

    <div id="auth-info">
        <security:authorize access="isAuthenticated()">
            Вы зашли как <security:authentication property="name"/>
            <a href="${pageContext.request.contextPath}/logout">выйти</a>
        </security:authorize>
        <security:authorize access="! isAuthenticated()">
            <a href="${pageContext.request.contextPath}/login.jsp">авторизация</a>
        </security:authorize>
    </div>
</div>